import { axios } from '@/utils/request'

/**
 * 查询到货入库单
 *
 * @author Eric
 * @date 2021-04-12 19:33:11
 */
export function storagePurchasePage (parameter) {
  return axios({
    url: '/storagePurchase/page',
    method: 'get',
    params: parameter
  })
}

/**
 * 到货入库单列表
 *
 * @author Eric
 * @date 2021-04-12 19:33:11
 */
export function storagePurchaseList (purchaseOrderCode) {
  return axios({
    url: '/storagePurchase/list',
    method: 'get',
    params: { purchaseOrderCode: purchaseOrderCode }
  })
}

/**
 * 添加到货入库单
 *
 * @author Eric
 * @date 2021-04-12 19:33:11
 */
export function storagePurchaseAdd (parameter) {
  return axios({
    url: '/storagePurchase/add',
    method: 'post',
    data: parameter
  })
}

/**
 * 编辑到货入库单
 *
 * @author Eric
 * @date 2021-04-12 19:33:11
 */
export function storagePurchaseEdit (parameter) {
  return axios({
    url: '/storagePurchase/edit',
    method: 'post',
    data: parameter
  })
}

/**
 * 删除到货入库单
 *
 * @author Eric
 * @date 2021-04-12 19:33:11
 */
export function storagePurchaseDelete (parameter) {
  return axios({
    url: '/storagePurchase/delete',
    method: 'post',
    data: parameter
  })
}

/**
 * 查询采购订单到货详情
 *
 * @author Eric
 * @date 2021-04-04 08:55:37
 */
 export function storagePurchaseDetail (code) {
  return axios({
    url: '/storagePurchase/detail',
    method: 'get',
    params: { purchaseStorageCode: code }
  })
}
